<template>
  <div class="main">
     城市语句生成器 
     {{  this.cities }}
  </div>
</template>
<script> 
import city from './citys'
export default {
  name: "App",  
  data() {
    return {
       str:city.str,
       cities:[],
    };
  },
  created() { 
  },
  mounted() {
    this.load();
  },
  methods: {
    load() {
      this.cities = this.str.split('\n').map(e=>e.split(','))
      this.cities = this.cities .toString().split(',').filter(d=>d)
      var s =  this.cities.map(e=>{
        return e + ' insert into  erd_agent values();'
      })
      var join = s.join('\n')
      console.log(join)
      /*
       insert into  erd_agent values(); 
      */
    },
  },
};
</script>
<style scoped>
.main {
  background: #fff;
} 
</style>